<form class="form-horizontal" id="form-add-swiper">

    <div class="form-group">
        <label class="control-label col-xs-2">图片<span style="color: #FF0000;">*</span></label>
        <div class="col-xs-9">
            {include file="public/singleImageUploader" uploader-name="img_url" /}
        </div>
    </div>

    <!--<div class="form-group">-->
        <!--<label class="control-label col-xs-2">链接</label>-->
        <!--<div class="col-xs-9">-->
            <!--<input type="text" class="form-control" name="link_url" value="{$settings.link_url}"-->
                   <!--placeholder="跳转链接，仅支持外部链接，需http://或https:// 开头">-->
        <!--</div>-->
    <!--</div>-->



    <div class="form-group">
        <div class="col-xs-offset-2 col-xs-3">
            <button type="submit" class="btn btn-success btn-block">确认修改</button>
        </div>
    </div>
</form>

<script src="__PUBLIC__/vendors/jquery.validation/jquery.validate.min.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/additional-methods.js"></script>
<script src="__PUBLIC__/vendors/jquery.validation/messages_zh.min.js"></script>
<script src="__PUBLIC__/vendors/select2/js/select2.min.js"></script>
<script type="application/javascript">
    $(function () {
        $("#form-add-swiper").validate({
            messages:
                {
//                    cid: "请选择轮播类型",
                },
            debug: true,
            submitHandler: function () {
                ajaxSubmit('form-add-swiper', true);
            }
        });
        //获取分类
//        $("#category-selector").select2({
//            placeholder: "选择轮播类型",
//            allowClear: true
//        });
    })
</script>